import {
	post
} from '@/utils/request.js'
export default {
	index: (data) => post('/journeycenter/v1/journey/index', data, {
		maxRetry: 3,
		onError: (err) => {
			// err 可能是 res.data 或者网络错误对象
			console.error('请求失败了', err)

			// 自定义处理，比如显示自定义提示
			uni.showToast({
				title: '接口调用失败，请稍后重试',
				icon: 'none'
			})
			// 或者做一些其他逻辑，比如上报日志
			// sendErrorLog(err)
		}
	}),
	add: (data) => post('/journeycenter/v1/journey/publish', data),
	mine: (data) => post('/journeycenter/v1/journey/mine', data),
	deleted: (data) => post('/journeycenter/v1/journey/del', data),
	detail: (data) => post('/journeycenter/v1/journey/detail', data),
	edit: (data) => post('/journeycenter/v1/journey/edit', data),
}